import Vue from 'vue';
import VueRouter from 'vue-router';

Vue.use(VueRouter);

export const staticRoutes = [
  {
    path: '/',
    name: 'home',
    component: () => import('@/views/HomeView'),
  },
  {
    path: '/about',
    name: 'about',
    component: () => import('@/views/AboutView.vue'),
  },
];

const router = new VueRouter({
  mode: "history",
  scrollBehavior: () => ({ y: 0 }),
  routes: staticRoutes,
});

export const dynamicRouter = [
  {
    path: '/user',
    name: 'user',
    component: () => import('@/views/AboutView.vue'),
  },
];

export default router;
